package lipengfei.botaiframework.security.jwt.handler.impl;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONUtil;
import lipengfei.botaiframework.utils.http.ResponseUtil;
import org.springframework.http.HttpStatus;

import lipengfei.botaiframework.security.jwt.exception.impl.JWTExpiredException;
import lipengfei.botaiframework.security.jwt.handler.TokenExpiredHandler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;


public class ExpireTokenHandler implements TokenExpiredHandler {

 
    public void handle(HttpServletRequest request, HttpServletResponse response) {
        Map<String, Object> resMap = new HashMap<String, Object>();
        resMap.put("code",5010);
        resMap.put("msg","jwttoken登录状态已经过期，请重新登录");
        ResponseUtil.out(response, JSONUtil.toJsonStr(resMap));
    }


}
